package com.lxl.action;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;

import com.lxl.service.TiebaService;

/**
 * 贴吧_删除贴吧Action
 * 
 * @author 刘星鹭
 * @Email liuxinglumail@163.com
 * @version 创建时间： 2014年11月30日 下午3:32:37
 */
@Controller
@Transactional
public class DeleteTiebaAction {
    @Resource
    TiebaService tiebaService;// 注入贴吧Service
    private String tiebaName;// 贴吧名

    /**
     * 调用本Action时执行本方法
     * 
     * @return 用于Action判断跳转方向的字符串
     */
    public String execute() {
        tiebaService.delete(tiebaService.find(tiebaName));
        return "success";
    }

    /**
     * 获得贴吧名
     * 
     * @return 贴吧名
     */
    public String getTiebaName() {
        return tiebaName;
    }

    /**
     * 设置贴吧名
     * 
     * @param tiebaName
     *            贴吧名
     */
    public void setTiebaName(String tiebaName) {
        this.tiebaName = tiebaName;
    }
}
